package com.spring.demos.ioccontainer.pojo;

public class EmailMessageSender {

    private String host;

    private String username;

    private String password;

    public EmailMessageSender(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getHost() {
        return host;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public boolean sendText(String from, String to, String copyTo, String text){
        System.out.println("from address: "+from+", to address: "+to+", copy to address: "+copyTo);
        System.out.println("send content: "+text);
        return true;
    }

    @Override
    public String toString() {
        return "EmailMessageSender{" +
                "host='" + host + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
